package com.albert.Request;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController// 声明为RESTful控制器，自动将返回值序列化为JSON
public class ParameterReceiveController {
    @RequestMapping("/para")// 定义控制器根路径以/para开头
    public String parameterReceive(@RequestParam(name = "name",required = false)String username, Integer age) {
        System.out.println(username+":"+age);
        return "OK";
    }
}
